package com.javasee.common.module;


import java.util.HashMap;
import java.util.Map;

/**
 *  [2025-08-27 08:56:45]
 */
public class ModuleEnableConst {

    //设置模块默认开启状态
    private static Map<String,Boolean> modulesMap = new HashMap<>();

    //后台管理
    public final static String MANAGE = "manage";

    //订单
    public final static String ORDER = "order";

    //查询
    public final static String QUERY = "query";

    //文件队列
    public final static String FQUEUE = "fqueue";

    //由ai生成的文件队列
    public final static String AIQUEUE = "aiqueue";

    //mq
    public final static String RABBITMQ = "rabbitmq";

    //分库分表
    public final static String DBSHARDING = "dbsharding";

    //redis
    public final static String REDIS = "redis";

    //mybatis
    public final static String MYBATIS = "mybatis";

    static {
        modulesMap.put(MANAGE,false);
        modulesMap.put(ORDER,false);
        modulesMap.put(QUERY,false);
        modulesMap.put(FQUEUE,false);
        modulesMap.put(AIQUEUE,false);
        modulesMap.put(RABBITMQ,false);
        modulesMap.put(DBSHARDING,false);
        modulesMap.put(REDIS,false);
        modulesMap.put(MYBATIS,false);
    }

    public static boolean getOnOff(String module){
        return modulesMap.get(module);
    }

    public static boolean setOnOff(String module,boolean value){
        modulesMap.put(module,value);
        return true;
    }
}